package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.helper.DataBaseHelper;
import com.ruoyi.system.domain.CompanyJob;
import com.ruoyi.system.domain.SmaiSocialinsurance;
import com.ruoyi.system.domain.SmaiSocialinsurance87203;
import com.ruoyi.system.mapper.CompanyJobMapper;
import com.ruoyi.system.mapper.SmaiQuestionnaireMapper;
import com.ruoyi.system.mapper.SmaiSocialinsurance87203Mapper;
import com.ruoyi.system.service.SelectTestService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@RequiredArgsConstructor
@Service
@Slf4j
public class SelectTestServiceImpl implements SelectTestService {

    private final CompanyJobMapper companyJobMapper;

    private final SmaiQuestionnaireMapper smaiQuestionnaireMapper;

    private final SmaiSocialinsurance87203Mapper smaiSocialinsurance87203Mapper;

    private final static Logger logger = LoggerFactory.getLogger(AddTestServiceImpl.class);

    @Override
    public List<CompanyJob> selectJobCompanyJob() {
        return companyJobMapper.selectList();
    }

    @Override
    public List<SmaiSocialinsurance> selectSmai() {
        return smaiQuestionnaireMapper.selectList();
    }

    @Override
    public List<SmaiSocialinsurance87203> selectSmaiYuan() {
        LambdaQueryWrapper<SmaiSocialinsurance87203> lqw = Wrappers.lambdaQuery();
        lqw.last("limit 100");
        return smaiSocialinsurance87203Mapper.selectVoList(lqw);
    }

    @Override
    public SmaiSocialinsurance87203 selectSmaiYuanById(Long id) {
        return smaiSocialinsurance87203Mapper.queryById(id);
    }
}
